Skip to content

Conversation

lcamhoa
Copy link

@lcamhoa lcamhoa commented Apr 24, 2025

Motivation and Context

When SSE Connection disconnect , we should free the _read_stream_writers

How Has This Been Tested?

  • Test with inspector -> connect -> disconnect

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@Kludex
Copy link
Member

Kludex commented Apr 25, 2025

This looks better. Can you add a test case, please?

@lcamhoa
Copy link
Author

lcamhoa commented Apr 26, 2025

This looks better. Can you add a test case, please?

I added . Please check

}
)

async def handle_see_disconnect(message: Message) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is also handled in #586. let's review that one first and then we can review this one as we have a test here -- thank you for adding it

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left my thought here And I don't think add callback to connect_sse is proper

@ihrpr ihrpr added this to the 2025-03-26 spec release milestone Apr 29, 2025
Copy link
Contributor

@ihrpr ihrpr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Unfortunately we can't upgrade starlette now.

  • Some of the fixes are already covered by #612

@lcamhoa
Copy link
Author

lcamhoa commented Jun 6, 2025

I think it was handled in #612

@lcamhoa lcamhoa closed this Jun 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants